﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/RopaOnline.Master" AutoEventWireup="true"
	CodeBehind="PersonManagement.aspx.cs" Inherits="Upsam.RopaOnline.Web.PersonManagement" %>

<asp:Content ID="cntHead" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="cntContext" ContentPlaceHolderID="cphContext" runat="server">
	<asp:FormView ID="fvwPerson" runat="server" BackColor="White" BorderColor="#E7E7FF"
		BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="IdPersona"
		DataSourceID="ldsPerson" GridLines="Horizontal" OnItemCommand="fvwPerson_ItemCommand"
		OnItemInserted="fvwPerson_ItemInserted" OnItemUpdated="fvwPerson_ItemUpdated" CssClass="formView">
		<FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
		<RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
		<EditItemTemplate>
			IdPersona:
			<asp:Label ID="IdPersonaLabel1" runat="server" Text='<%# Eval("IdPersona") %>' />
			<br />
			Nombre:
			<asp:TextBox ID="NombreTextBox" runat="server" Text='<%# Bind("Nombre") %>' />
			<br />
			Apellido:
			<asp:TextBox ID="ApellidoTextBox" runat="server" Text='<%# Bind("Apellido") %>' />
			<br />
			Correo Electrónico:
			<asp:TextBox ID="EmailTextBox" runat="server" Text='<%# Bind("Email") %>' />
			<br />
			Teléfono:
			<asp:TextBox ID="TelefonoTextBox" runat="server" Text='<%# Bind("Telefono") %>' />
			<br />
			Móvil:
			<asp:TextBox ID="MovilTextBox" runat="server" Text='<%# Bind("Movil") %>' />
			<br />
			Sexo:
			<asp:RadioButtonList ID="SexoCheckBox" runat="server">
				<asp:ListItem Text="Masculino" Value="false"></asp:ListItem>
				<asp:ListItem Text="Femenino" Value="true"></asp:ListItem>
			</asp:RadioButtonList>
			<br />
			FechaNacimiento:
			<asp:Calendar ID="FechaNacimientoTextBox" runat="server" SelectedDate='<%# Bind("FechaNacimiento") %>' Width="220px" 
						BackColor="White" BorderColor="#3366CC" BorderWidth="1px" CellPadding="1" 
						DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt" 
						ForeColor="#003399" Height="200px">
						<SelectedDayStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
						<SelectorStyle BackColor="#99CCCC" ForeColor="#336666" />
						<WeekendDayStyle BackColor="#CCCCFF" />
						<TodayDayStyle BackColor="#99CCCC" ForeColor="White" />
						<OtherMonthDayStyle ForeColor="#999999" />
						<NextPrevStyle Font-Size="8pt" ForeColor="#CCCCFF" />
						<DayHeaderStyle BackColor="#99CCCC" ForeColor="#336666" Height="1px" />
						<TitleStyle BackColor="#003399" BorderColor="#3366CC" BorderWidth="1px" 
							Font-Bold="True" Font-Size="10pt" ForeColor="#CCCCFF" Height="25px" />
			</asp:Calendar>
			<br />
			<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
				Text="Update" />
			&nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False"
				CommandName="Cancel" Text="Cancel" />
		</EditItemTemplate>
		<InsertItemTemplate>
			Nombre:
			<asp:TextBox ID="NombreTextBox" runat="server" Text='<%# Bind("Nombre") %>' />
			<br />
			Apellido:
			<asp:TextBox ID="ApellidoTextBox" runat="server" Text='<%# Bind("Apellido") %>' />
			<br />
			Email:
			<asp:TextBox ID="EmailTextBox" runat="server" Text='<%# Bind("Email") %>' />
			<br />
			Telefono:
			<asp:TextBox ID="TelefonoTextBox" runat="server" Text='<%# Bind("Telefono") %>' />
			<br />
			Movil:
			<asp:TextBox ID="MovilTextBox" runat="server" Text='<%# Bind("Movil") %>' />
			<br />
			Sexo:
			<asp:RadioButtonList ID="SexoCheckBox" runat="server">
				<asp:ListItem Text="Masculino" Value="false"></asp:ListItem>
				<asp:ListItem Text="Femenino" Value="true"></asp:ListItem>
			</asp:RadioButtonList>
			<br />
			FechaNacimiento:
			<asp:Calendar ID="FechaNacimientoTextBox" runat="server" SelectedDate='<%# Bind("FechaNacimiento") %>' Width="220px" 
						BackColor="White" BorderColor="#3366CC" BorderWidth="1px" CellPadding="1" 
						DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt" 
						ForeColor="#003399" Height="200px">
						<SelectedDayStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
						<SelectorStyle BackColor="#99CCCC" ForeColor="#336666" />
						<WeekendDayStyle BackColor="#CCCCFF" />
						<TodayDayStyle BackColor="#99CCCC" ForeColor="White" />
						<OtherMonthDayStyle ForeColor="#999999" />
						<NextPrevStyle Font-Size="8pt" ForeColor="#CCCCFF" />
						<DayHeaderStyle BackColor="#99CCCC" ForeColor="#336666" Height="1px" />
						<TitleStyle BackColor="#003399" BorderColor="#3366CC" BorderWidth="1px" 
							Font-Bold="True" Font-Size="10pt" ForeColor="#CCCCFF" Height="25px" />
			</asp:Calendar>
			<br />
			<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert"
				Text="Insert" />
			&nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False"
				CommandName="Cancel" Text="Cancel" />
		</InsertItemTemplate>
		<ItemTemplate>
			IdPersona:
			<asp:Label ID="IdPersonaLabel" runat="server" Text='<%# Eval("IdPersona") %>' />
			<br />
			Nombre:
			<asp:Label ID="NombreLabel" runat="server" Text='<%# Bind("Nombre") %>' />
			<br />
			Apellido:
			<asp:Label ID="ApellidoLabel" runat="server" Text='<%# Bind("Apellido") %>' />
			<br />
			Email:
			<asp:Label ID="EmailLabel" runat="server" Text='<%# Bind("Email") %>' />
			<br />
			Telefono:
			<asp:Label ID="TelefonoLabel" runat="server" Text='<%# Bind("Telefono") %>' />
			<br />
			Movil:
			<asp:Label ID="MovilLabel" runat="server" Text='<%# Bind("Movil") %>' />
			<br />
			Sexo:
			<asp:Label ID="SexoCheckBox" runat="server" Text='<%# Bind("Sexo") %>' />
			<br />
			FechaNacimiento:
			<asp:Label ID="FechaNacimientoLabel" runat="server" Text='<%# Bind("FechaNacimiento") %>' />
			<br />
			<asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" CommandName="Edit"
				Text="Edit" />
			&nbsp;<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" CommandName="New"
				Text="New" />
		</ItemTemplate>
		<PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
		<HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
		<EditRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
	</asp:FormView>
	<asp:LinqDataSource ID="ldsPerson" runat="server" ContextTypeName="Upsam.RopaOnline.Modelo.Data.RopaOnLineDataContext"
		EnableInsert="True" EnableUpdate="True" TableName="Personas" Where="IdPersona == @IdPersona">
		<WhereParameters>
			<asp:QueryStringParameter DefaultValue="0" Name="IdPersona" QueryStringField="IdEntity"
				Type="Int32" />
		</WhereParameters>
	</asp:LinqDataSource>
</asp:Content>
